import java.util.Arrays;
import java.util.Arrays;

public class HelloWorld {
    public static void main(String[] args) {
        int[][] arry1=new int[2][];  //不规则的二维数组
        arry1[0]=new int[2];//或者arry1[0]=new int[]{11,22,33,44};
        arry1[1]=new int[5];
        System.out.println(Arrays.deepToString(arry1));
    }
    public static void main9(String[] args) {
        int[][] arr={{1,2,3},{4,5,6}};

        System.out.println(Arrays.toString(arr[0]));
        System.out.println(Arrays.toString(arr[1]));
        System.out.println(Arrays.deepToString(arr));

    }
    public static  int findDuoSum(int[] arr){

        int n=0;
        int x=arr.length/2;

        for (int i = 0; i < arr.length; i++) {
            n=0;
            for(int j=0;j<arr.length;j++){
                if(arr[j]==arr[i]){
                    n++;
                }
            }
            if(n>x){

             return i;
            }

        }
        return -1;
    }
    public static void main8(String[] args) {

        int[] arr1 = {1};
        int a = findDuoSum(arr1);
        if (a == -1) {

        } else {
            System.out.println(arr1[a]);

        }
    }
    public static String fun2(int[] arr,int target){
       String ret=" ";
        for (int i = 0; i < arr.length; i++) {
            for(int j=i+1;j<arr.length;j++){
                if(arr[i]+arr[j]==target){
                  ret+=i;
                  ret+=",";
                  ret+=j;
                  return ret;
                }
            }
        }
        return ret;
    }
    public static int[] func(int[] arr,int target){
        int[] ret={-1,-1};
        for (int i = 0; i < arr.length; i++) {
            for(int j=i+1;j<arr.length;j++){
                if(arr[i]+arr[j]==target){
                    ret[0]=i;
                    ret[1]=j;
                    return ret;
                }
            }
        }
        return ret;
    }
    public static void main2(String[] args) {
        int[] arr1={1,10,3,4,5};
        fun2(arr1,6);
        String ret=fun2(arr1,6);
        System.out.println(ret);

    }
    public static void bubble(int[] arr){
        int tmp=0;
    
        for (int i = 0; i < arr.length-1; i++) {
             boolean flg=false;
            for (int j=0;j< arr.length-i-1;j++){
                if(arr[j]>arr[j+1]){
                    tmp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=tmp;
                    flg=true;
                }
            }
            if(flg==false){
                return;
            }

        }
    }
    public static void main1(String[] args) {
        int[] arr={9,8,7,6,5,4,3,2,1,0};
        bubble(arr);
        System.out.println(Arrays.toString(arr));
    }
    public static void main6(String[] args) {
        int[] arr1=new int[100];
        for (int i = 0; i < arr1.length; i++) {
            arr1[i]=i+1;
        }
        System.out.println(Arrays.toString(arr1));
    }
}